# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

.PHONY: help
help: # Show help for each of the Makefile recipes.
	@grep -E '^[a-zA-Z0-9 -]+:.*#'  Makefile | sort | while read -r l; do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done

.PHONY: serve
serve: # Clean, build, and run the docs site locally.
	dev/serve.sh

.PHONY: serve-dev
serve-dev:
	dev/serve-dev.sh

.PHONY: build
build: # Clean and build the docs site locally.
	dev/build.sh

.PHONY: deploy
deploy: # Clean, build, and deploy the Iceberg docs site.
	dev/deploy.sh $(remote_name)

.PHONY: lint
lint: # Check linting on the docs.
	dev/lint.sh

.PHONY: lint-fix
lint-fix: # Run linting with auto-fix on the docs.
	dev/lint.sh --fix

.PHONY: clean
clean: # Clean the local docs site.
	dev/clean.sh
